class ProjectCalendar < ActiveRecord::Base

  default_scope { where(:deleted_at => nil) }
  default_scope { order(dodate: :asc) }

  PER_PAGE = 10
  paginates_per PER_PAGE

  has_one :project
  
  # 虚拟字段
  # 获取项目
  def post_project
    return Project.find(self.project_id)
  end

end
